Class java.util.BASE64Decoder
All Packages    This Package    Previous    Next

Class java.util.BASE64Decoder

java.lang.Object
   |
   +----java.util.CharacterDecoder
           |
           +----java.util.BASE64Decoder

public class BASE64Decoder
extends CharacterDecoder
This class implements a BASE64 Character decoder as specified in RFC1113. This RFC is part of the Privacy Enhanced Mail (PEM) specification which is published by the Internet Engineering Task Force (IETF). Unlike some other encoding schemes there is nothing in this encoding that tells the decoder where a buffer starts or stops, so to use it you will need to isolate your encoded data into a single chunk and then feed them this decoder. The simplest way to do that is to read all of the encoded data into a string and then use:
	byte	mydata[];
	BASE64Decoder base64 = new BASE64Decoder();
	mydata = base64.decodeBuffer(bufferString);
This will decode the String in bufferString and give you an array of bytes in the array myData. On errors, this class throws a CEFormatException with the following detail strings:
   "BASE64Decoder: Bad Padding byte (2)."
   "BASE64Decoder: Bad Padding byte (1)."
Version:
1.1, 16 Mar 1995
Author:
Chuck McManis
See Also:
CharacterEncoder, BASE64Decoder

BASE64Decoder()

BASE64Decoder
  public BASE64Decoder()

All Packages    This Package    Previous    Next